Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Use consistent cache-control:max-age=600 for HTML pages #429

Merged
merged 2 commits into from
Sep 8, 2018

Conversation

nolanlawson
Copy link
Contributor

Currently there is a cache-control:max-age=600 set for index.html, but no cache-control header set for the HTML pages served from routes. This PR makes both of them consistently use max-age:600 in production and no-cache in development.

In a future PR, I would like to make all of these cache-control headers configurable:

  • immutable assets ('max-age=31536000, immutable' by default)
  • routes, index.html ('max-age=600' by default)
  • service worker ('max-age=0' by default, see Set service-worker max-age to 0 #428)

But for now I would settle for making them consistent. :)

@Rich-Harris Rich-Harris merged commit 7ef72db into sveltejs:master Sep 8, 2018
@Rich-Harris
Copy link
Member

Makes sense — thanks. More configurability would definitely be good in the longer term — I opened #415 the other day

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants